<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:f="http://xmlns.jcp.org/jsf/core">

    <ui:composition template="/template.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.CreateRolTitle}"></h:outputText>
        </ui:define>
        <ui:define name="body">
            <h:panelGroup id="messagePanel" layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            </h:panelGroup>
            <h:form>
                <h:panelGrid columns="2">
                    <h:outputLabel value="#{bundle.CreateRolLabel_id}" for="id" />
                    <h:inputText id="id" value="#{rolController.selected.id}" title="#{bundle.CreateRolTitle_id}" required="true" requiredMessage="#{bundle.CreateRolRequiredMessage_id}"/>
                    <h:outputLabel value="#{bundle.CreateRolLabel_HExtra}" for="HExtra" />
                    <h:inputText id="HExtra" value="#{rolController.selected.HExtra}" title="#{bundle.CreateRolTitle_HExtra}" />
                    <h:outputLabel value="#{bundle.CreateRolLabel_comision}" for="comision" />
                    <h:inputText id="comision" value="#{rolController.selected.comision}" title="#{bundle.CreateRolTitle_comision}" />
                    <h:outputLabel value="#{bundle.CreateRolLabel_fecha}" for="fecha" />
                    <h:inputText id="fecha" value="#{rolController.selected.fecha}" title="#{bundle.CreateRolTitle_fecha}" >
                        <f:convertDateTime pattern="MM/dd/yyyy" />
                    </h:inputText>
                    <h:outputLabel value="#{bundle.CreateRolLabel_contratoid}" for="contratoid" />
                    <h:inputText id="contratoid" value="#{rolController.selected.contratoid}" title="#{bundle.CreateRolTitle_contratoid}" />
                    <h:outputLabel value="#{bundle.CreateRolLabel_montoTot}" for="montoTot" />
                    <h:inputText id="montoTot" value="#{rolController.selected.montoTot}" title="#{bundle.CreateRolTitle_montoTot}" />
                </h:panelGrid>
                <br />
                <h:commandLink action="#{rolController.create}" value="#{bundle.CreateRolSaveLink}" />
                <br />
                <br />
                <h:commandLink action="#{rolController.prepareList}" value="#{bundle.CreateRolShowAllLink}" immediate="true"/>
                <br />
                <br />
                <h:link outcome="/index" value="#{bundle.CreateRolIndexLink}"/>
            </h:form>
        </ui:define>
    </ui:composition>

</html>
